home *** CD-ROM | disk | FTP | other *** search
- Path: pwolf-mac.qualcomm.com!user
- From: pwolf@qualcomm.com (Paul I. Wolf )
- Newsgroups: comp.lang.c
- Subject: Re: Problem in my INT 16H!!!
- Date: 11 Jan 1996 19:35:22 GMT
- Organization: Qualcomm, Inc.
- Message-ID: <pwolf-1101961135200001@pwolf-mac.qualcomm.com>
- References: <1996Jan11.112500.5877@opalo.etsiig.uniovi.es>
- NNTP-Posting-Host: pwolf-mac.qualcomm.com
-
- In article <1996Jan11.112500.5877@opalo.etsiig.uniovi.es>,
- u1436956@soneto.etsiig.uniovi.es (FERNANDEZ CASTA#O ; JOSE IGNACIO) wrote:
-
- > WHAT IS THE PROBLEM???
- >
- [snip]
- > void interrupt far new_16h(__CPPARGS)
- > {
- [snip]
- >
- > asm {
- > mov ax,_out
- > }
- > enable();
- > }
-
- The return value must replace the saved ax on the stack, or you must
- return from the interrupt yourself in assembler and adjust the stack
- pointer. Interrupt routines in C cannot return any registers.
-
- You can declare the interrupt routine as interrupt _far newint() and write
- the routine as Interrupt _far newing(stackstructure), where stackstruct
- represents the registers pushed on the stack by the interrupt. You can
- then change the structure members in C to change the values returned by
- the interrupt.
-